﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="fenpeipeixunpici.aspx.cs"
    Inherits="Admin1_Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="m_box">
        <div class="m_head">
            定义学习批次</div>
        <%--  <div class="m_middle">
            <div class="m_m_c">
                <span>查询条件</span></div>
            <div class="m_m_c">
                单位名称</div>
            <div class="m_m_c">
                <asp:TextBox ID="TextBox1" runat="server" Width="92px" Height="16px"></asp:TextBox>
            </div>
            <div class="m_m_c">
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/image/search.gif" OnClick="ImageButton1_Click" />
            </div>
            <asp:Button ID="Button2" runat="server" Text="新增" onclick="Button2_Click" />
            查询时可输入简称进行，如：林业、公安</div>--%>
        <div>
            <div class="m_content">
                <div>
                    
                    <br />
                    <br />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="Button1" runat="server" Text="自动分配培训批次" OnClick="Button1_Click" />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
                    <br />
                    <br />
                    &nbsp;
                </div>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Height="16px"
                    Style="float: left" AllowPaging="True" CellPadding="4" ForeColor="Black" GridLines="Horizontal"
                    OnPageIndexChanging="GridView1_PageIndexChanging" OnRowDeleting="GridView1_RowDeleting"
                    BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                    OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowEditing="GridView1_RowEditing"
                    OnRowUpdating="GridView1_RowUpdating" 
                    OnSelectedIndexChanged="GridView1_SelectedIndexChanged1" DataKeyNames="id" 
                    Width="516px">
                    <Columns>
                        <asp:BoundField DataField="picishijian" HeaderText="学习批次" 
                            SortExpression="picishijian">
                            <HeaderStyle Width="300px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="zuigairenshu" HeaderText="最多人数" 
                            SortExpression="zuigairenshu" />
                        <asp:BoundField DataField="yifenpeirenshu" HeaderText="已分配人数" 
                            SortExpression="yifenpeirenshu" />
                    </Columns>
                    <RowStyle HorizontalAlign="Center" />
                    <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
                    <HeaderStyle BackColor="#3a9cff" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" DeleteCommand="DELETE FROM [xuexipici] WHERE [id] = ? AND (([picishijian] = ?) OR ([picishijian] IS NULL AND ? IS NULL)) AND (([zuigairenshu] = ?) OR ([zuigairenshu] IS NULL AND ? IS NULL))"
                    InsertCommand="INSERT INTO [xuexipici] ([id], [picishijian], [zuigairenshu]) VALUES (?, ?, ?)"
                    OldValuesParameterFormatString="original_{0}" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
                    SelectCommand="SELECT * FROM [xuexipici]" UpdateCommand="UPDATE [xuexipici] SET [picishijian] = ?, [zuigairenshu] = ? WHERE [id] = ? AND (([picishijian] = ?) OR ([picishijian] IS NULL AND ? IS NULL)) AND (([zuigairenshu] = ?) OR ([zuigairenshu] IS NULL AND ? IS NULL))">
                    <DeleteParameters>
                        <asp:Parameter Name="original_id" Type="Int32" />
                        <asp:Parameter Name="original_picishijian" Type="String" />
                        <asp:Parameter Name="original_picishijian" Type="String" />
                        <asp:Parameter Name="original_zuigairenshu" Type="Int32" />
                        <asp:Parameter Name="original_zuigairenshu" Type="Int32" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="id" Type="Int32" />
                        <asp:Parameter Name="picishijian" Type="String" />
                        <asp:Parameter Name="zuigairenshu" Type="Int32" />
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="picishijian" Type="String" />
                        <asp:Parameter Name="zuigairenshu" Type="Int32" />
                        <asp:Parameter Name="original_id" Type="Int32" />
                        <asp:Parameter Name="original_picishijian" Type="String" />
                        <asp:Parameter Name="original_picishijian" Type="String" />
                        <asp:Parameter Name="original_zuigairenshu" Type="Int32" />
                        <asp:Parameter Name="original_zuigairenshu" Type="Int32" />
                    </UpdateParameters>
                </asp:SqlDataSource>
            </div>
        </div>
        <asp:HiddenField ID="HiddenField1" runat="server" />
        <div class="t_button">
            <asp:ImageButton ID="ImageButton3" runat="server" ImageUrl="~/image/allselect.gif"
                OnClick="ImageButton3_Click" />
            <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/image/cselect.gif"
                OnClick="ImageButton2_Click" />
            <asp:ImageButton ID="ImageButton4" runat="server" ImageUrl="~/image/adelete.gif"
                OnClick="ImageButton4_Click" />
        </div>
    </div>
    </form>
</body>
</html>
